/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

window.onload = function(){
    var url = window.location;
    var qs = url.search;
    var qsArr = qs.split("&");

    var mailSent;
    var paramName;
    for (i=0; i < qsArr.length; i++){
        var param = qsArr[i].split("=");
        if (param[0] != null){
            paramName = param[0];
            mailSent = param[1];
        }
    }
    if(mailSent == "undefined" || paramName != "?mailSent")
        return;

    if(mailSent == "1"){
        alert("You mail has been sent.");
    }else
        alert("Mail delivery failed!");
};
